package com.paopao.login.server;
import java.util.List;
import java.util.Set;
import javax.annotation.Resource;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.paopao.login.dao.UserDao;
import com.paopao.login.pojo.User;
/**
* <p>Title: UserServerImpl</p>
* <p>Description: </p>
* <p>Company: </p>
 * @author douchen
 * @date 2017年12月19日 下午4:31:13
*/
@Service("userServer")
public class UserServerImpl   implements UserServer 
{

	@Resource
	private UserDao userDao;
	public User getByUserName(String userName)
	{
		return userDao.getByUserName(userName);
	}

	public Set<String> getRoles(String userName)
	{
		return userDao.getRoles(userName);
	}

	public Set<String> getPermissions(String userName)
	{
		Set<String> ss=userDao.getPermissions(userName);
		return ss;
	}

	public List query()
	{
		return userDao.query();
	}

	public Integer add(User user)
	{
		return userDao.add(user);
	}

	@Override
	public Integer DeleteByids(String ids)
	{
		return userDao.deleteById(ids);
	}
}
